package AJava1月.EJava第五周.练习题;

import java.util.Scanner;

public class if语句商品的价格03格式 {

/*商品实行会员制
* 会员一级打九折
* 会员二级打八折
* 会员三级打七折*/

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        System.out.println("顾客请输入你所支付的钱数");
        int money = sc.nextInt();

        System.out.println("顾客请输入你的会员等级");
        int vip = sc.nextInt();
        if(vip >=1 && vip<=3){
            if(vip == 1){
                System.out.println(money * 0.9);
            }else if(vip == 2){
                System.out.println(money * 0.8);
            }else if(vip == 3){
                System.out.println(money * 0.7);
            }
        }else {
            System.out.println(money);
        }


    }
}
